<template>
    <fs-page class="supplier-product-page">
        <fs-crud ref="crudRef" v-bind="crudBinding"></fs-crud>
    </fs-page>
</template>

<script lang="ts">
import { defineComponent, onMounted, ref } from 'vue';
import { useFs } from '@fast-crud/fast-crud';
import createCrudOptions from './crud';

export default defineComponent({
    name: 'SupplierProduct',
    setup() {
        const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions });
        
        // 页面加载时刷新数据
        onMounted(() => {
            crudExpose.doRefresh();
        });

        return {
            crudBinding,
            crudRef
        };
    }
});
</script>

<style lang="scss" scoped>
.supplier-product-page {
    height: 100%;
}
</style> 